<template>
	<view>
	
	<view class="box">
		{{arr.createTime}}
		<view class="content">
			{{arr.context}}
			<!-- 欢迎使用抢拍app,更多简便功能将后续开发,请敬请期待! -->
		</view>
	</view>
		
		
		
		
	</view>
</template>
<script>
	import {
		getSysMsg,
		sysMsgSetIsRead
	} from '@/api/new.js';



	export default {

		data() {
			return {
				List:[],
				listId:'',
				arr:{}
			}
		},
		onLoad(e){
			uni.setNavigationBarTitle({
				title:this.$t('system.title.detail')
			})
			this.listId = e.id?e.id:''
			sysMsgSetIsRead(e.id).then(res=>{})
			let that = this
			getSysMsg().then(res=>{
				if(res.code == 200){
					that.List = res.data.list
					// console.log(this.List);
					that.List.forEach(item=>{
						if(item.id == that.listId){
						  that.arr = item
						 console.log(item.type,'daoooooooo',item);
						  switch(item.type){
							  case 1:
							   let value1 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-1')+value1[0]+this.$t('system.infoDetail-1.1')
							  break;
							  
							  case 2:
							   let value = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-1')+value[0]+this.$t('system.infoDetail-2')+value[1]+this.$t('system.infoDetail-3')+value[2]+this.$t('system.infoDetail-4')
							  break;
							  
							  case 3:
							   let value3 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type3_1')+value3[0]+this.$t('system.infoDetail-type3_2')+value3[1]+this.$t('system.infoDetail-type3_3')
							  break;
							  
							  case 4:
							   let value4 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type4_1')+value4[0]+this.$t('system.infoDetail-type4_2')+value4[1]+this.$t('system.infoDetail-type4_3')
							  break;
							  
							  case 5:
							   let value5 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type5')+value5[0]
							  break;
							  
							  case 7:
							   let value7 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type7_1')+value7[0]+this.$t('system.infoDetail-type7_2')
							  break;
							  
							  case 8:
							   let value8 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type8_1')+value8[0]+this.$t('system.infoDetail-type8_2')
							  break;
							  
							  case 9:
							   let value9 = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type9_1')+value9[0]+this.$t('system.infoDetail-type9_2')
							  break;
							  
							  case 6:
							   let valueTen = item.value.split(',')
							  that.arr.context = this.$t('system.infoDetail-type10_1')+valueTen[0]+this.$t('system.infoDetail-type10_2')
							  break;
						  }
						  return 
						}
					})
					console.log(that.arr,'arrrrrrrrr');
				}
				
			})
		},
		mounted(){
			// getSysMsg().then(res=>{
			// 	if(res.code == 200){
			// 		this.List = res.data.list
			// 		console.log(this.List);
			// 	}
				
			// })
		},
		methods:{
			navSysDetail(id){
				
			}
		}
	}
</script>
<style lang="scss">
	.box{
		padding: 10px;
		margin: 10px;
		background: #fff;
		.top{
			position: relative;
			display: flex;
			justify-content: space-between;
			.title{
				font-size: 18px;
				font-weight: bold;
			}
			
		}
		.content{
			padding: 15px 0;
			// text-align: justify;
		}
	}
</style>